home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / tex-k / tex-k-archive.past / tex-k-archive.gz / tex-k-archive / 000717_Peter.Bruells@a…i-oldenburg.de_Sun Jul 3 19:07:47 1994.msg < prev    next >
Internet Message Format  |  1994-10-11  |  2KB

  1. Received: from arbi.Informatik.Uni-Oldenburg.DE by cs.umb.edu with SMTP id AA12069
  2.   (5.65c/IDA-1.4.4 for <tex-k@cs.umb.edu>); Sun, 3 Jul 1994 19:07:47 -0400
  3. Received: by arbi.informatik.uni-oldenburg.de (smail3.1.18 + xalias);
  4.     Sun, 3 Jul 94 23:14 CES
  5. Received: by diamant.Informatik.Uni-Oldenburg.DE (Smail-3.1.28.1)
  6.     id <m0qKYqj-0003DLC@diamant.Informatik.Uni-Oldenburg.DE>;
  7.     Sun, 3 Jul 94 23:13 MET DST
  8. Message-Id: <m0qKYqj-0002h6C@eowyn.Informatik.Uni-Oldenburg.DE>
  9. Date: Sun, 3 Jul 94 23:13 MET DST
  10. From: Peter Bruells <Peter.Bruells@arbi.informatik.uni-oldenburg.de>
  11. To: kb@cs.umb.edu
  12. Cc: tex-k@cs.umb.edu
  13. In-Reply-To: <199407021045.AA27414@terminus.cs.umb.edu> (kb@cs.umb.edu)
  14. Subject: Problems /xdvik/gs   unsolved, but reason found (hopefully)
  15.  
  16. >>>>> "K" == K Berry <kb@cs.umb.edu> writes:
  17.  
  18.      [xdvik was unable do display eps-files and I couldn't figure
  19.       out why]
  20.  
  21.     K> Maybe the gs thing is a bug in the pbm output, or the way xdvi
  22.     K> is reading it, or something. I don't remember anyone else
  23.     K> reporting it.
  24.  
  25. I think I figured it out and I think it's a problem with Ghostscript
  26. 2.6.1 (5/28/93), which is was present on all the systems I tried to
  27. run xdvik on.
  28.  
  29.  
  30. After examining the code (something I detest :) ) I found out that gs
  31. is invoked with various commands to get a bitmap of a predefined size.
  32. (Or so I believe.)
  33.  
  34.  
  35.  
  36. Xdvi does this:
  37.  
  38. Making EPS bitmap with cmd: 
  39. (echo -8 -8 translate 0.499286 0.499286 scale 0.000000 rotate;  \
  40. cat ./mtest.ps; echo showpage) |  gs -q -sDEVICE=bit -dNOPAUSE -r100 -g390x554  \
  41. -sOutputFile=/tmp/aaa026486 ->/dev/null 2>&1
  42.  
  43. -rw-r--r--   1 bruells  staff     243360  Jul 03 21:45 aaa026363
  44.  
  45.  
  46. But what gs churned out 827 x 1170 bitmap. Makeby I am missing
  47. something here, but I think that this piece of code from epsf.c 
  48.  
  49.  
  50.     int line_size = (int)(ROUNDUP(result->w, 8));
  51.  
  52.     for (line=0; line < ((int)result->h); line++)
  53.       fread(&(result->bits[line*result->bytes_wide]), line_size, 1, gs_out); 
  54.   }
  55.  
  56.  
  57. means, that xdvi expects to read 
  58.  
  59. 49 bytes == (390 == result->w ) / 8) (rounded) 
  60.  
  61. result->h (== 554) times, which would indictae a 27146 byte files.
  62.  
  63. Indeed, if I rescale aaa026363 to 390x554, I get a file of size 27247
  64. (pbmraw).
  65.  
  66.  
  67. This let's xdvik off the hook, but why does Ghostscript behave like
  68. this? Or am I the only one to whom this has happened?
  69.  
  70.  
  71. Peter